<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setCharacterEncoding("UTF-8");
%>
<html>
	<head>
		<title>组织结构树</title>
	<base target="_self">
	<link rel="stylesheet" href="<%=path%>/webmanager/dtree/dtree.css"
			type="text/css"></link>
		<script type="text/javascript"
			src="<%=path%>/webmanager/dtree/dtree.js"></script>
	</head>
<%
 response.setHeader("Cache-Control","no-store");
 response.setDateHeader("Expires", 0);
 response.setHeader("Pragma","no-cache"); 
%>
<jsp:include page="../common/init.jsp"></jsp:include>
<style type="text/css">
<!--
body {
	margin-left: 10px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	height:100%;
}
-->
</style>
<script type="text/javascript">
//选中部门
function selectedBmxx(bmbh,bmmc)
{
	document.forms[0].bmbh.value=bmbh;
	document.forms[0].bmmc.value=bmmc;
}
//返回选中部门
function doSubmit()
{
	var bmxx = new Array();
	if(document.forms[0].bmbh.value==""||document.forms[0].bmmc.value=="")
	{
		bmxx=null;
	}
	else
	{
		bmxx[0]=document.forms[0].bmbh.value;
		bmxx[1]=document.forms[0].bmmc.value;
	}
	window.returnValue=bmxx;
	window.close();
}
</script>
	<body>
	<form name="selBmxxForm" action="" method="post">
  <table border="0" width="150" cellpadding="0" cellspacing="0">
    <tr >
  <td height="5">
  <input type="hidden" name="bmbh" >
  <input type="hidden" name="bmmc" >
  </td>
  </tr>
  <tr >
  <td width="150">
<div id="bmtree" class="dtree" style="overflow:scroll;width:290px;height:350px;">
<script type="text/javascript">
dtree = new dTree("dtree");
//dtree.config.target="_self";
<s:iterator  value="treeList" status="index">
<s:if test="${ccs==1}">
dtree.add("<s:property  value="bmbh"/>","-1","<s:property  value="bmmc"/>","javascript:selectedBmxx('<s:property  value="bmbh"/>','<s:property  value="bmmc"/>')","","");
</s:if>
<s:else>
dtree.add("<s:property  value="bmbh"/>","<s:property  value="sjbmbh"/>","<s:property  value="bmmc"/>","javascript:selectedBmxx('<s:property  value="bmbh"/>','<s:property  value="bmmc"/>')","","");
</s:else>
</s:iterator>
document.write(dtree);
</script>
</div>
  </td>
  </tr>
  </table>
  <div class="butk">
<div class="btn_01">
<a href="#" onclick="doSubmit()">保&nbsp;存</a>
</div>
<div class="btn_01">
<a href="#" onclick="window.close();">关&nbsp;闭</a>
</div>
</div>
<iframe id="selFrame" style="display: none;"></iframe>
  </form>
	</body>
</html>
